@include('admin.common.header')
<!--tab nav start-->
<section class="panel">
    <header class="panel-heading tab-bg-dark-navy-blue ">
        <ul class="nav nav-tabs">
            <li @if ($_active['_action'] == 'list')  class="active" @endif>
                <a href="/admin/activity">活动列表</a>
            </li>
            <li @if ($_active['_action'] == 'enroll')  class="active" @endif>
                <a href="/admin/activity/enroll/{{$id}}">报名管理</a>
            </li>
            <li @if ($_active['_action'] == 'history')  class="active" @endif>
                <a href="/admin/activity/enroll/HistoryEnroll/{{$id}}">历史报名</a>
            </li>
        </ul>
  </header>
    <div class="panel-body">
        <div class="tab-content">
            <div class="row">
                <div class="col-lg-12">
                    <section class="panel">
                        @if(count($enroll['list'])== 0)
                            <div class="no-data">暂无要查询的内容</div>
                        @else
                            <table class="table table-striped table-advance table-hover">
                                <thead>
                                <tr>
                                    <th>报名ID</th>
                                    <th>昵称</th>
                                    <th>真实姓名</th>
                                    <th>联系方式</th>
                                    <th>身份证</th>
                                    <th>联系人类别</th>
                                    <th>有无孩子</th>
                                    <th>积分</th>
                                    <th>操作</th>
                                    <th>删除联系人</th>
                                </tr>
                                </thead>
                                <tbody>
                                @foreach($enroll['list'] as $b)
                                    <tr>
                                        <td>
                                            <input type="hidden" name="activity_id" value="{{$b->activity_id}}"/>
                                            {{$b->eid}}
                                        </td>
                                        <td>{{$b->nick_name }}</td>
                                        <td>
                                            @foreach($b->personal as $in)
                                                <p>{{ $in->real_name}}</p>
                                            @endforeach
                                        </td>
                                        <td>
                                            @foreach($b->personal as $in)
                                                <p>{{ $in->mobile}}</p>
                                             @endforeach
                                        </td>
                                        <td>
                                            @foreach($b->personal as $in)
                                                <p>{{ $in->idcard }}</p>
                                            @endforeach
                                        </td>
                                        <td>
                                            @foreach($b->personal as $in)
                                                <p>{{ $in->relation }}</p>
                                            @endforeach
                                        </td>
                                        <td>{{ $b->has_child?'无':'有'}}</td>
                                        <td>{{ $b->integral }}</td>
                                        <td>
                                            <a href="/admin/activity/enrolledit/{{ $b->uid }}" target="_blank" class="btn btn-primary btn-xs update" gid="{{ $b->uid }}">修改积分</a>
                                        </td>
                                        <td>
                                            @foreach($b->personal as $in)
                                                <p> <button href="/admin/activity/enrolldelete/{{ $in->enroll_id}}/{{$in->personal_id}}" class="delete btn btn-danger btn-xs"><i class="icon-trash "></i></button></p>
                                            @endforeach
                                        </td>
                                    </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        @endif
                    </section>
                </div>
            </div>
        </div>
    </div>
</section>
<!--tab nav start-->

<script>

    require(['app/goods' , 'common/common' , 'app/enrolldel'] , function (goods , common ,enrolldel) {
        enrolldel.enrolldel();
        common.search();
    });

</script>

<script type="text/html" id="search">
    <section class="panel">
        <div class="panel-body">
            <div class="tab-content">
                <div class="row cmxform form-horizontal tasi-form">
                    <div class="col-lg-12">
                        <section class="panel">
                            <div class="panel-body">
                                <div class="form-group ">
                                    <h4>暂无搜索条件</h4>
                                </div>
                            </div>
                        </section>
                    </div>
                </div>
            </div>
        </div>
    </section>
</script>

@include('admin.common.footer')